1. Field of the Invention
The present invention relates to an image processing method to determine a highlight point, an image processing apparatus and a recording medium.
2. Related Background Art
In these years where personal computers had higher speeds, memory capacities were enlarged rapidly, and digital cameras, film scanners or the like widely prevail, there were increasing occasions to process images of photographic tones as digital data with personal computers. In not a few cases, however, inputs of the photographic images are accompanied by causes for image degradation such as color fog for reasons which will be described below.
For example, when a digital camera is taken as an example, rays which have wavelengths insensible by a man""s eye such as infrared rays may be taken into an image photographed by a CCD camera. Though the rays are processed with an infrared cut filter or the like needless to say, the processing is not always complete and colors may be unbalanced on the image.
Though man observes an object while correcting (adapting himself to) a difference of light source colors as known well, a camera records the difference of light source colors on a film with no correction and may provide a result which looks like color fog even when the camera accurately measures and reproduces the colors.
For printing an image which is photographed with a silver salt camera (conventional camera) in a laboratory, it is general to use an automatic correcting function which analyzes a scene through an analysis of the photographed image at a stage to print the image onto the photographic paper. The applicant has proposed a method for setting a highlight point and a shadow point as a fundamental automatic correction method for digital data inputted into personal computers such as images photographed with digital cameras.
As a method for automatizing setting of a highlight point and a shadow point, Japanese Patent Application Laid-Open No. 60-87594, for example, discloses a method for preparing an accumulated frequency histogram of luminance signals which are obtained by imparting weights to color signals R, G and B of input signals and totalizing the color signals, for determining an upper limit value (a concentration at a highlight point) and a lower limit value (a concentration at a shadow point) which correspond to predetermined accumulated frequencies, for example, 1% and 99% on the accumulated frequency histogram, and for performing normalization processing using the upper limit value and the lower limit value commonly to the color signals R, G and B.
When the input color signals R, G and B are 8-bit data information (from 0 to 255 information) and converted into luminance signals in an NTSC mode, for example, the luminance signals are also 8-bit data information since
Y (luminance)=0.30R+0.59G+0.11B.
That is, the histogram is used to determine frequencies of 256 luminance signals from 0 to 255. Each of the R, G and B signals is hereinafter considered in 256 8-bit gradations.
However, it is impossible in certain cases to obtain sufficiently satisfactory results even when images are corrected by using the standard concentration points which are set as described above. As a cause for such unsatisfactory results, there can be mentioned a fact that man sees an object on the basis of his memory colors.
Therefore, it is general to carry out memory color processing which provides more satisfactory results, that is, colors are reproduced so as to be matched not with calorimetric colors but with man""s psychological image so that colors of blue sky, green trees and grasses and man""s skin are reproduced preferably.
Though sunlight in the daytime and a tungsten lamp in a room are light sources having color temperatures which are remarkably different from each other, the man""s eye can recognize a gray (or white) object under either of the light sources. This is because an observer recognizes gray (white) in his environment and automatically corrects a sensitivity with three cones of a retina on the basis of the gray (white) so as to obtain the same response to rays. In contrast, the camera is under a direct influence from the light sources and reproduces colors with a high calorimetric fidelity, thereby posing a problem that it cannot reproduce colors which are preferred by man.
When the blue sky is taken as an example in particular, a shadow portion has a color temperature which is enhanced by rays reflected from the blue sky and becomes bluish as a whole on a photograph taken outdoors in a shiny condition. When a cloud is floating in the blue sky, the man""s eye automatically corrects a color of the cloud into white, whereby a difference may be produced between a color of the blue sky memorized by the man and a color of the blue sky which is calorimetrically reproduced. It has been found that it is possible, by balancing a desired cloud with white, to bring a color of the blue sky on an actual photograph close to the color of the blue sky memorized by the man.
In case of a photograph a most portion of which is occupied by a blue sky, however, it is not always possible to set an optimum highlight point from the conventional histogram which is prepared from the luminance signals having the weights since the B signal has a low weight. In other words, the histogram is unusable to correct a bluish cloud into a white cloud.
When a person or the like is photographed in a backlight condition, a main object is rather underexposed, thereby making it impossible to obtain favorable gradations. When a highlight point which is set at 99%, for example, from an accumulated frequency histogram shown in FIG. 10, for example, as described with reference to the related art, the high lightpoint is fixed nearly to a maximum luminance and correction with this histogram is almost ineffective.
Furthermore, digital input images may not be exposed adequately for a reason which will be described below.
In photographing with an ordinary camera which is not set for adequate exposure, for example, an image may be too bright or too dark due to overexposure or underexposure, thereby making details of an object illegible. Furthermore, a digital camera which photographs an image with a CCD device may pick up rays such as infrared rays which have wavelengths invisible by the man""s eye. Exposure correction which is made by visual confirmation may result in an overexposure condition due to the invisible infrared rays picked up by the CCD device even if exposure is adequate for the visible rays. Though the rays are processed with an infrared cut filter or the like, the processing is not always complete and may allow a condition such as that described above.
Moreover, there are cases where adequate exposure provides conditions which look like underexposure. This is traced to a fact that man visually recognizes an object while correcting (adapting himself to) differences in luminance in his environment as known well. Even when a camera reproduces luminance accurately, the camera which records the differences in luminance with high fidelity on a recording medium such as a film or a memory card may provide a result which looks like underexposure for man who compares a photograph provided by the camera with an image memorized by himself.
To enhance qualities of digital images which have photographic tones, it is therefore necessary to correct exposed digital images dependently on their exposure conditions so that the images are close to those which are memorized by man and have adequate intermediate tones.
On an image having a photographic tone which is underexposed or overexposed, a luminance distribution is deviated toward low or high luminance, for example, as shown in FIG. 18 illustrating a luminance histogram of an image which is overexposed. Overexposure and underexposure are conventionally judged using standard values which are considered to represent luminance distributions on luminance histograms.
Japanese Patent Application Laid-Open No. 9-068764, for example, proposes a method which judges overexposure or underexposure using at least one of a standard maximum value, a standard minimum value and an average value for image correction.
An image of a person which is photographed using a flash or an image of a scene which is photographed in a backlight condition can be mentioned as an example of image which can hardly be judged for overexposure or underexposure by the conventional method.
For example, an image of a person generally has a luminance histogram which is like that of an image of a person photographed in the night shown in FIG. 21, however the method proposed by the patent mentioned above which compares the standard maximum value or the standard minimum value with a threshold value judges the image of the person as underexposure in judgement of overexposure or underexposure. Furthermore, the method judges the image of the scene in the backlight condition as overexposure in most cases.
With respect to this judgement, the patent describes a technique to use the average value which will add a luminance value to an area of the person. When an image area corresponding to the person which is an area having high luminance in the image is small as compared with an area of the image as shown in FIG. 21, that is, when a frequency distribution peak on a high luminance side represents a relatively low frequency on a histogram, however, the average value is pulled and located on a low luminance side by a frequency distribution peak on a high luminance side having a cumulative frequency which is absolutely high, whereby the method judges the image as underexposure even when the person which is a main object is exposed adequately.
In addition, the area of the person which is located on the low luminance side is made too dark when a lookup table (LUT) is used to correct a luminance value of an overexposed image at a stage to correct the image of the scene in the backlight condition.
An object of the present invention is to make it possible to process colors according to characteristics of an original image.
It is provided an image processing method comprising a plurality of highlight point detecting method,
wherein the method selects a highlight point depending on characteristics of an original image and said method sets a color processing condition for the original image depending on the highlight point.
Another object of the present invention is to make it possible to favorably reproduce original images which are photographed in backlight conditions.
It is provided an image processing method comprising the steps of:
creating a histogram of an original image;
detecting whether or not the original image is a backlight scene on the basis of the histogram; and
detecting a highlight point by a highlight point detecting method according to a result of the detection.
Also, an object of the present invention is to make it possible to execute an image process suited for a backlight scene by judging an image photograghed by using stroboscope.
It is provided an image processing method comprising the steps of:
inputting an image data representing an object image;
creating a histogram;
judging whether or not said object image is photographed at night with a stroboscope on the basis of the created histogram; and
setting image processing conditions on the basis of a result of the judgment.
Still another object of the present invention is to make it possible to correct an image with high accuracy by setting an adequate highlight point, thereby obtaining a favorable output image.
It is provided an image processing method comprising the steps of:
creating a histogram of an input image on the basis of color components representing brightness;
detecting a highlight point of said input image on the basis of the created histogram;
determining a corrected highlight point according to the detected highlight point: and
correcting colors of said input image on the basis of the detected highlight point and said corrected highlight point.